package com.settlement.system.model.entity.common;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.settlement.system.converter.*;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 唯品汇总
 * @author user
 */
@Data
@ExcelIgnoreUnannotated
@HeadStyle(fillBackgroundColor = 9,fillForegroundColor = 9)
@HeadRowHeight(value = 20)
@HeadFontStyle(fontHeightInPoints = 14)
public class WpSummary extends BaseModel{

    /**
     * 公司编码
     */
    private String companyNo;

    /**
     * 公司名称
     */
    private String companyName;

    /**
     * 店铺编码
     */
    private String shopNo;

    /**
     * 店铺名称
     */
    @ExcelProperty(value = "店铺名称")
    private String shopName;

    /**
     * 账单明细 1:销售明细 2:客退明细 3:其他明细
     */
    @ExcelProperty(value = "账单明细",converter = WpSummaryOrderTypeConvert.class)
    private Integer orderType;

    /**
     * 销售日期
     */
    @ExcelProperty(value = "销售日期", converter = DateFormatConvert.class)
    private Date sendDate;

    /**
     * 凭证摘要FPP:首期（提前),FP:首期,AP:全款,TP:尾款
     */
    @ExcelProperty(value = "凭证摘要",converter = WpVoucherSummaryConvert.class)
    private String voucherSummary;


    /**
     * 税率
     */
    @ExcelProperty(value = "开票税率")
    private BigDecimal taxRate;

    /**
     * 入账月份
     */
    @ExcelProperty(value = "入账月份")
    private String entryAccountMonth;

    /**
     * 结账月份
     */
    @ExcelProperty(value = "结账月份")
    private String settleAccountMonth;


    /**
     * 结算期间
     */
    @ExcelProperty(value = "结算期间")
    private String settleAccountPeriod;

    /**
     * 账单类别　M 月结账单，P 进度账单 ，H 人工账单，T 经销账单，TGCY 退供差异账单
     */
    @ExcelProperty(value = "账单类别",converter = WpBillNumberTypeConvert.class)
    private String billNumberType;


    /**
     * 档期
     */
    @ExcelProperty(value = "档期")
    private String calendar;

    /**
     * 入账数量
     */
    @ExcelProperty(value = "入账数量")
    private BigDecimal enterQty;

    /**
     * NC收入
     */
    @ExcelProperty(value = "NC收入")
    private BigDecimal amount;


    /**
     * 暂估金额
     */
    @ExcelProperty(value = "暂估40%")
    private BigDecimal estimateAmount;


    /**
     * 100%数量
     */
    @ExcelProperty(value = "100%数量")
    private BigDecimal allQty;

    /**
     * 100%收入
     */
    @ExcelProperty(value = "100%收入")
    private BigDecimal allAmount;

    /**
     * 100%终端收入
     */
    @ExcelProperty(value = "100%终端收入")
    private BigDecimal allTerminalAmount;

    /**
     * 100%平台扣费
     */
    @ExcelProperty(value = "100%平台扣费")
    private BigDecimal allPlatformAmount;

    /**
     *开票金额
     */
    @ExcelProperty(value = "开票金额")
    private BigDecimal taxAmount;


    /**
     * 品牌编码
     */
    private String brandNo;

    /**
     * 品牌名称
     */
    @ExcelProperty(value = "品牌名称")
    private String brandName;

    /**
     * 差异类别
     */
    private String diffType;

    /**
     * 大类
     */
    private String category;

    /**
     * 大类名称
     */
    @ExcelProperty(value = "大类")
    private String categoryName;

    @ExcelProperty(value = "订单发货类型")
    private String warehouseExt;

    /**
     * 发货模式
     */
    @ExcelProperty(value = "发货模式",converter = WpDeliveryTypeConvert.class)
    private Integer deliveryType;

    /**
     * 账单编码
     */
    @ExcelProperty(value = "账单编码")
    @NotNull(message = "账单编码不能为空")
    private String billNumber;

    /**
     * 账单明细类别-只用于传参
     */
    private String billDetailType;
}
